package com.hopu.service.impl;

import com.hopu.entity.Message;
import com.hopu.mapper.MessageMapper;
import com.hopu.service.IMessageService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService implements IMessageService {

    @Resource
    private MessageMapper messageMapper;

    @Override
    public List<Message> selectMessage() {
        List<Message> message = messageMapper.selectMessage();
        if (message.isEmpty()) {
            return null;
        }else {
            return message;
        }
    }
}
